import { doGet, appJsonPost } from '@/network/request';


/**
 * 新增权限
 */
export function addApi(data: object) {
    return appJsonPost({
        url: "/authority/add",
        data: data,

    });
}

/**
 * 查询权限表格树
 */
export function queryTableTreeApi() {
    return doGet({
        url: "/authority/queryTableTree",

    });
}

/**
 * 查询权限树
 */
export function queryTreeApi() {
    return doGet({
        url: "/authority/queryTree",

    });
}

/**
 * 按id删除
 */
export function deleteByIdApi(id: string) {
    return doGet({
        url: "/authority/deleteById",
        params: { id },

    });
}

/**
 * 通过id进行查询
 */
export function queryByIdApi(id: string) {
    return doGet({
        url: "/authority/queryById",
        params: { id },

    });
}

/**
 * 通过id进行修改
 */
export function modifyByIdApi(data: object) {
    return appJsonPost({
        url: "/authority/modifyById",
        data: data,

    });
}

/**
 * 查询全部后端uri映射
 */
export function listBackUriApi() {
    return doGet({
        url: "/authority/listBackUri",

    });
}
